<!--
 * @Author: your name
 * @Date: 2020-11-08 22:36:43
 * @LastEditTime: 2020-11-24 13:30:14
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \mi_mall\src\pages\order.vue
-->
<template>
  <div>
    <order-header :title="title">
      <template v-slot:tip>
        <span>{{ tips }}</span>
      </template>
    </order-header>
    <router-view />
    <nav-footer />
  </div>
</template>

<script>
import OrderHeader from '../components/OrderHeader'
import NavFooter from '../components/NavFooter'

export default {
  name: 'order',
  data() {
    return {
      title: '',
      tips: '',
    }
  },
  components: {
    OrderHeader,
    NavFooter,
  },
  mounted() {
    console.log(this.$route)
    let pathName = this.$route.name
    switch (pathName) {
      case 'order-confirm':
        this.title = '确认订单'
        this.tips = '温馨提示：请仔细核验订单信息'
        break
      case 'order-list':
        this.title = '订单列表'
        this.tips = '温馨提示：。'
        break
      case 'order-pay':
        this.title = '订单支付'
        this.tips = '温馨提示：警惕钓鱼诈骗链接'
        break
      case 'order-alipay':
        this.title = '支付宝支付'
        this.tips = '温馨提示：警惕钓鱼诈骗链接'
        break
      default:
        break
    }
  },
}
</script>

<style></style>
